<%= form_tag({:controller => 'articles',:action => 'search'}) do %>
		<h1>Filter Condital</h1>
	<table >
  	<tr>
    	<th>Title</th>
    	<th>Event</th>
    	<th>Create_at</th>
    	<th>Update_at</th>
    	<th>Status</th>
    	<th>User</th>
  	</tr>
  	<tr>
    	<td><input type="text" name="txtTitle"></td>
		<td><select name="image[event_id]">
				<% @event.each do |event| %>
					<option value= <%= event.id %> > <%= event.title %></option>
				<% end %>
			</select></td>
		<td>
		<input id="datepicker" type="text" name="create_date" />
		</td>		
		<td><input id="datepicker1"  type="text" name="update_date" /></td>
    	<td><select name="image[image_status_id]">
				<% @image_status.each do |image_status| %>
					<option value= <%= image_status.id %> > <%= image_status.alias %></option>
				<% end %>
			</select></td>
    	
  	</tr>
	</table>
		<input id="search" name="search" type="submit" value="Search"/> 	
	<% end %><br>
	<h1>Listing images</h1>

<table>
  <tr>
	<th>Image</th>
    <th>Title</th>
	<th>Event</th>
    <th>Width</th>
    <th>Height</th>
    <th></th>
    <th></th>
    <th></th>
  </tr>

<% @images.each do |image| %>
  <tr>
	<td><img  boder="1" border src="/images/event/<%= image.picture %>" name="I1" width="100" height="100" type="image"></td>
    <td><%= image.title %></td>
	<td><%= image.event.title %></td>
    <td><%= image.width %></td>
    <td><%= image.height %></td>
    <td><%= link_to 'Show', image %></td>
    <td><%= link_to 'Edit', edit_image_path(image) %></td>
    <td><%= link_to 'Destroy', image, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New Image', new_image_path %>
